app.controller('columnAddCtrl',['$scope','columnAddService','$stateParams','toaster','$state', function($scope,columnAddService,$stateParams,toaster,$state) {

    $scope.columnAddService=columnAddService;

    //添加模块
    $scope.addColumn=function(){
        columnAddService.addColumn($scope).then(function(result){
            switch (result.status){
                case 200:
                    toaster.pop('success', "提示", "操作成功");
                    $state.go('app.column');
                    break;
                default :
                    toaster.pop('error', "操作失败", "发生未知错误！请联系管理员");
                    break;
            }
        })
    }

}
]);